<template>
  <view>
    <u-navbar title="病历详情" back-icon-size="34" title-size="36" :border-bottom="false" :background="background" title-color="#222" back-icon-color="#222"></u-navbar>
    <view class="" style="width: 100%; height: 20rpx; background: #f8f8f8"></view>
    <!-- 纸质 -->
    <view class="" style="margin-top: 20rpx; background: #fff">
      <view class="" style="display: flex; align-items: center; justify-content: space-between; height: 99rpx; border-bottom: 1rpx solid #e7e7e7">
        <view class="" style="font-size: 28rpx; padding-left: 29rpx">姓名</view>
        <view class="" style="padding-right: 35rpx; font-size: 26rpx; color: #999999">
          {{ list.patient_name }}
        </view>
      </view>
      <view class="" style="display: flex; align-items: center; justify-content: space-between; height: 99rpx; border-bottom: 1rpx solid #e7e7e7">
        <view class="" style="font-size: 28rpx; padding-left: 29rpx">性别</view>
        <view class="" style="padding-right: 35rpx; font-size: 26rpx; color: #999999">
          {{ list.patient_gender == 0 ? '女' : '男' }}
        </view>
      </view>
      <view class="" style="display: flex; align-items: center; justify-content: space-between; height: 99rpx; border-bottom: 1rpx solid #e7e7e7">
        <view class="" style="font-size: 28rpx; padding-left: 29rpx">年龄</view>
        <view class="" style="padding-right: 35rpx; font-size: 26rpx; color: #999999">{{ list.patient_age }}岁</view>
      </view>
      <view class="" style="display: flex; align-items: center; justify-content: space-between; height: 99rpx; border-bottom: 1rpx solid #e7e7e7">
        <view class="" style="font-size: 28rpx; padding-left: 29rpx">问诊时间</view>
        <view class="" style="padding-right: 35rpx; font-size: 26rpx; color: #999999">
          {{ list.submit_time_text }}
        </view>
      </view>
      <view class="" style="display: flex; align-items: center; justify-content: space-between; height: 99rpx; border-bottom: 1rpx solid #e7e7e7">
        <view class="" style="font-size: 28rpx; padding-left: 29rpx">科室</view>
        <view class="" style="padding-right: 35rpx; font-size: 26rpx; color: #999999">
          {{ list.department_name }}
        </view>
      </view>
    </view>
    <view class="" style="width: 100%; height: 20rpx; background: #f8f8f8"></view>
    <!-- 备注 -->
    <view class="" style="font-size: 28rpx; padding: 45rpx 28rpx">备注：</view>
    <view class="" style="padding: 0 27rpx; font-size: 26rpx">
      {{ list.remark }}
    </view>
    <view class="" style="width: 100%; height: 2rpx; background: #f8f8f8; margin-top: 85rpx"></view>
    <!-- 病情描述 -->
    <view class="" style="font-size: 28rpx; padding: 45rpx 28rpx">病情描述：</view>
    <view class="" style="padding: 0 27rpx; font-size: 26rpx">
      {{ list.describe }}
    </view>
    <view class="" style="width: 100%; height: 2rpx; background: #f8f8f8; margin-top: 85rpx"></view>
    <view class="" style="width: 100%; height: 20rpx; background: #f8f8f8; margin-top: 80rpx"></view>

    <view class="" style="font-size: 30rpx; padding: 30rpx">
      <text>患处照片</text>
      <text style="font-size: 24rpx; color: #999999"></text>
    </view>
    <view class="" style="display: flex; align-items: center; padding: 0 28rpx">
      <view class="">
        <image
          :src="img_url + i"
          mode=""
          style="width: 162rpx; height: 162rpx; border-radius: 12rpx"
          v-for="(i, k) in list.images"
          :key="k"
          @click="util.seeimg([img_url + i], k)"
        ></image>
      </view>
    </view>
    <view class="" style="width: 100%; height: 20rpx; background: #f8f8f8; margin-top: 48rpx"></view>
    <view class="" style="font-size: 28rpx; padding: 43rpx 0 25rpx 28rpx">诊断</view>
    <view class="" style="padding: 0 27rpx; font-size: 26rpx">
      {{ list.diagnose }}
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      background: {
        background: '#FFFFFF'
      },
      id: null,
      list: {}
    };
  },
  methods: {
    detail() {
      this.api({
        url: '/api/doctor/getCaseDetail',
        method: 'post',
        data: {
          case_id: this.id
        }
      }).then((res) => {
        this.list = res.data;
      });
    }
  },
  onLoad(op) {
    this.list = JSON.parse(op.id);
  }
};
</script>

<style></style>
